package view;

import org.uqbar.arena.windows.WindowOwner;
import org.uqbar.commons.model.ObservableUtils;

import ApplicationModels.EmpleadoAppModel;
import Domain.Empleado;
import Domain.Tienda;

@SuppressWarnings("serial")
public class NuevoEmpleadoWindow extends EditarEmpleadoWindow {

	public NuevoEmpleadoWindow(WindowOwner owner, Tienda model) {
		super(owner, new EmpleadoAppModel(new Empleado(), model));
	}

	@Override
	protected void executeTask() {
		this.getModelObject().agregarEmpleado();
		ObservableUtils.firePropertyChanged(this, "empleados", this
				.getModelObject().getTienda().getEmpleados());
		super.executeTask();
	}

}
